<?php
require "common.php";
if ($_POST) {
    //print_r($_POST);

    $title = $_POST['title'];
    $content = $_POST['content'];
    $time = time();

    mysql_query("insert into `article` (`title`, `content`, `time`) values ('$title', '$content', '$time')");
    echo "<script>alert('发布成功'),location.href='index.php'</script>";

}



require "templates/add.html";
